home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
wb
/
czesc_4
/
vark15
/
utils a-o
/
megafloppy.lha
/
megaflop.doc
< prev
next >
Wrap
Text File
|
1996-07-16
|
7KB
|
245 lines
The Megafloppy package
----------------------
by David Balazic in 1996
Contents :
1. Copyright
2. Beta release
3. What is this anyway ? ( a description of the package )
4. Description of programs
5. Usage of (z)read, (z)write , code and decode
6. Using (z) and and non (z) versions of read and write
7. Working ... not working
8. Coding
9. Authors address
1. Copyright
This is FREEWARE !!!!!!
Meaning that U can use it and spread without involving any money.
U may NOT disassemble it, reverse engineer it, include in other
software or other packages etc...
2. This is a very beta release !
I may contain bugs and may crash Your system.
And it doesnt even work properly when it doesnt crash :(
3. What is this anyway ?
This package includes some files from my xfloppy.device project
( suggestions for an other name are welcome )
xfloppy.device is a driver for floppies which looks like trackdisk.device
and works with the floopy drives, but ( tada... ) saves 1120 kb on a
DD floppy. ( HD support for 2320 kb is in plan )
With the programs in this package U can write and read back 1120 kb of
data to/from a normal DD floppy !
4. Description of the programs
split :
Synopsis : split <file> <part-size>
Splits <file> in chunks of <part-size> bytes.
Can be used to chop big files in smaller pieces which can them be
manipulated with the following tools.
(z)read :
Synopsis : (z)read <file> [track]
(z)read reads a raw track ( default is track 0 , range 0-159 ) into
memory with the trackdisk command TD_RAWREAD and saves it to the <file>.
The difference between read and zread is that zread sets the
TDF_INDEXSYNC flag and thereby staret reading the data aproximatly after
the index mark on floppy.
Look in section 6. for more info on this
(z)write :
Synopsis : (z)write <file> [track]
(z)write write the contents of <file> to track [track] ( default is 0 )
using TD_RAWWRITE.
Again zwrite uses INDEXSYNC and write doesn't.
Look in section 6. for more info on this
code :
Synopsis : code <infile> <outfile> <legth>
code reada <length> bytes from <infile> codes it (look in 8. Coding)
and writes it to <outfile>.
decode :
Synopsis : decode <infile> <outfile> <legth>
decode decodes <lenght> bytes from <infile> and writes them to <outfile>.
megafloppy :
This is an "user-friendly" compilation of former tools.
It should ( look in 7. working ... not working ) read and write large files
to floppyes saving 1120 kb to one floppy.
the arguments :
READ - read from disk to file
WRITE - write to disk from file
FILE - file name , - for stdio
UNIT - floppy unit
FILEOFFSET - offset in the file to start reading from,
when writing ( WRITE ) to floppy
DISKOFFSETB
DISKOFFSETT - offset on the floppy to start reading/writing,
in (T)racks or (B)ytes
DATALENB
DATALENT - amount of data to be copied in (B)ytes or (T)racks
ASKDISK - ask for floppy if none inserted ( not implemented yet )
QUIET - be quiet, no output
Usage:
- write a 500 kb file to floppy
> megafloppy write 500kfile
- read it back
> megafloppy read 500kfile2 datalenb 512000
- write 32 kbytes from file testfile to floppy starting at track 55
> megafloppy write testfile diskoffsett 55 datalenb 32768
- read it back
> megafloppy read testfile.head diskoffsett 55 datalenb 32768
- write the second 8 kb of file xfile to floppy
> megafloppy write xfile datalenb 8192 fileoffset 8192
5. Usage of (z)read, (z)write , code and decode
Using these tools U can write some data to a track on the floppy
Examples :
- write 6000 bytes from testfile to track 0
> code testfile test.coded 6000
this creates the file test.coded which contains the first 6000 bytes
of file testfile in coded form.
> (z)write testfile.coded
this writes the contents of testfile.coded to track 0 of the internal
floppy ( unit 0 )
- read these 6000 bytes back
> (z)read read.raw
... reads track 0 into file read.raw
> decode read.raw decoded.file 6000
decodes 6000 bytes from read.raw and saves them to decoded.file
Now the first 6000 bytes of files testfile and decoded.file should
be same
ooops I forgot to include a file comparing utility, but as a hacker
U sure own some tool like that :)
But it may fail for different reasons :
- the disk cannot hold the data. this may happen , because I used
a pretty demanding coding ( look in 8. Coding )
the decode program will probaly report an error or just produce
a bad output file
- error in the coding procedure
I may had made an error in the (de)coding algorhytms ... :(
- bad will of the gods
cant help against .... :)
U may repeat the former steps using other number of bytes, like
7168 ( 14 * 512 , the base of xfloppy.device , 14 sectors per track )
or even more ....
6. Using (z) and and non (z) versions of read and write
There is no much difference in which versions U use.
If U use the (z) versions , then all data will be aligned to the
index sync mark. This method is used in megafloppy and xfloppy.device.
Index sync may be broken ( ??? ) on some drives , then (z) programs
will act just like the other ones.
IMPORTANT:
zread can only read back properly ( well, zread will work, but then
decode will fail ... ) data which was saved by zwrite.
read can read back every type of saved data . try it if zread fails.
7. Working ... not working
Recently I discovered that the procedure fails for some kind of input
data :(((
for example the browser.lha archive failed at decoding at file offset ~50k
... then it failed right on the beginning :((
for a while I saved and read back using (z)read/(z)write/code/decode
quite a lot of data and worked OK.
So please report me about Your success and/or failure.
Oh... To be able to save 7168 bytes to a track and use megafloppy
the tracklen on Your drive must be at least 12300 bytes ( if I
remember it right .... )
8. Coding
To achieve more capacity of floppy I used an enhanced data coding
instead of MFM ( which is normaly used on amiga and other computers )
My method has ratio 1 : 1 + 2/3 ( 1 : 5/3 )
while MFM has 1 : 2
which means that MFM codes 100 bits to 200 bits
and my method codes 100 bits to 166 bits !
9. Authors address
snail mail :
David Balazic
Centiba 39
SLO-9220 LENDAVA
Slovenija
E-mail : david.balazic@uni-mb.si
home page : http://www.uni-mb.si/~uel003r2a